package com.yizisu.mvvmlib.demo.base2Demo

import android.os.Bundle
import android.view.LayoutInflater
import com.yizisu.mvvmlib.R
import com.yizisu.mvvmlib.baselib.base.BaseFragment
import kotlinx.android.synthetic.main.activity_demo2.*

class Demo2Fragment : BaseFragment() {
    override fun getContentResOrView(inflater: LayoutInflater): Any? = R.layout.fragment_demo2

    override fun initUi(savedInstanceState: Bundle?) {
        super.initUi(savedInstanceState)
        loading.setOnClickListener {
            showLoadingView()
        }
        content.setOnClickListener {
            showContentView()
        }
        other.setOnClickListener {
            showOtherView()
        }
    }

    override fun isNeedToolbar(): Boolean {
        return true
    }

    override fun isNeedSwitchView(): Boolean {
        return true
    }
}